#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <windows.h>

int NumOfOne(int n)
{
	int count = 0;
	while (n){
		n = n&(n - 1);
		count++;
	}
	return count;
}

int main()
{
	int num;
	scanf("%d", &num);
	printf("%d  %d 1\n",num,NumOfOne(num));
	system("pause");
	return 0;
}